<template>
  <div>
    <div class='title'>猜你喜欢</div>
    <ul>
      <router-link
      tag='li'
      class='item border-bottom'
      v-for="item of list"
      :key="item.id"
      :to="'/detail/'+item.id">
        <img class="item-img" :src="item.imgUrl" />
        <div class="item-desc">
          <p class="item-title">{{item.title}}</p>
          <p class="item-connent">{{item.desc}}</p>
        </div>
      </router-link>
    </ul>
  </div>
</template>
<script>
export default{
  name: 'HomeRecommend',
  props: {
    list: Array
  }
}
</script>

<style lang='stylus' scoped>
  @import "~styles/mixins.styl"
  .title
    height: .44rem
    background: #eee
    padding: .24rem 0 .26rem .2rem
    font-size: .32rem
    line-height: .44rem
  .item
    overflow: hidden
    display: flex
    height: 2rem
    padding-bottom: .2rem
    .item-img
      height: 2rem
      width: 2rem
    .item-desc
      flex: 1
      margin-left: .2rem
      min-width: 0
      .item-title
        font-size: .32rem
        line-height: .44rem
        padding-top: .1rem
        ellipsis()
      .item-connent
        padding-top: .5rem
        font-size: .2rem
        ellipsis()
</style>
